inherited FRotinaGeraPedido: TFRotinaGeraPedido
  Left = 358
  Top = 219
  Caption = 'Gera Pedido'
  OldCreateOrder = True
  OnClose = FormClose
  OnCreate = FormCreate
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 16
  inherited panel2: TPanel
    inherited BtnExec: TBitBtn
      OnClick = BtnExecClick
    end
  end
  inherited pnBg: TPanel
    object Label1: TLabel
      Left = 8
      Top = 8
      Width = 91
      Height = 16
      Caption = 'Solicita'#231#227'o (F8)'
    end
    object Label2: TLabel
      Left = 8
      Top = 80
      Width = 78
      Height = 16
      Caption = 'Data Ranking'
    end
    object DBText1: TDBText
      Left = 8
      Top = 96
      Width = 65
      Height = 17
      DataField = 'RANK_DATA'
      DataSource = dsRanking
    end
    object Label4: TLabel
      Left = 112
      Top = 16
      Width = 27
      Height = 16
      Caption = 'Data'
    end
    object Label6: TLabel
      Left = 200
      Top = 16
      Width = 110
      Height = 16
      Caption = 'Solicitante / Motivo'
    end
    object Label7: TLabel
      Left = 112
      Top = 38
      Width = 8
      Height = 16
      Caption = '  '
    end
    object Label8: TLabel
      Left = 200
      Top = 38
      Width = 12
      Height = 16
      Caption = '   '
    end
    object Label9: TLabel
      Left = 200
      Top = 56
      Width = 12
      Height = 16
      Caption = '   '
    end
    object edRanking: TEdit
      Left = 8
      Top = 26
      Width = 89
      Height = 22
      MaxLength = 8
      TabOrder = 0
      OnExit = edRankingExit
      OnKeyDown = edRankingKeyDown
    end
  end
  object dsCadastro: TDataSource
    AutoEdit = False
    DataSet = cdsCadastro
    Left = 400
    Top = 48
  end
  object QCadastro: TQuery
    DatabaseName = 'base'
    SQL.Strings = (
      'Select * from Pedido'
      'Order By Ped_Codigo'
      '')
    Left = 400
    Top = 80
  end
  object dspCadastro: TDataSetProvider
    DataSet = QCadastro
    Constraints = True
    Left = 400
    Top = 112
  end
  object cdsCadastro: TClientDataSet
    Aggregates = <>
    Filtered = True
    Params = <>
    ProviderName = 'dspCadastro'
    Left = 400
    Top = 144
    object cdsCadastroPED_CODIGO: TIntegerField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'PED_CODIGO'
    end
    object cdsCadastroPED_SOLICITANTE_DESC: TStringField
      DisplayLabel = 'Solicitante'
      FieldName = 'PED_SOLICITANTE_DESC'
      Size = 60
    end
    object cdsCadastroPED_FORNECEDOR: TIntegerField
      FieldName = 'PED_FORNECEDOR'
    end
    object cdsCadastroPED_FORNECEDOR_DESC: TStringField
      DisplayLabel = 'Fornecedor'
      FieldName = 'PED_FORNECEDOR_DESC'
      Size = 60
    end
    object cdsCadastroPED_TRANSPORTADORA: TIntegerField
      DisplayLabel = 'Transportadora'
      FieldName = 'PED_TRANSPORTADORA'
    end
    object cdsCadastroPED_OBS: TStringField
      DisplayLabel = 'Obs'
      FieldName = 'PED_OBS'
      Size = 255
    end
    object cdsCadastroPED_DATA: TDateTimeField
      DisplayLabel = 'Data'
      FieldName = 'PED_DATA'
    end
    object cdsCadastroPED_DATAENTREGA: TDateTimeField
      DisplayLabel = 'Entrega'
      FieldName = 'PED_DATAENTREGA'
    end
    object cdsCadastroCODIGOEMPRESA: TIntegerField
      FieldName = 'CODIGOEMPRESA'
    end
    object cdsCadastroPED_SITUACAO: TIntegerField
      FieldName = 'PED_SITUACAO'
    end
    object cdsCadastroPED_DATASITUACAO: TDateTimeField
      FieldName = 'PED_DATASITUACAO'
    end
    object cdsCadastroPED_LOCAL: TIntegerField
      FieldName = 'PED_LOCAL'
    end
    object cdsCadastroPED_VALOR_TOT_ITENS: TFloatField
      FieldName = 'PED_VALOR_TOT_ITENS'
    end
    object cdsCadastroPED_VALOR_TOT_OUTROS_VALORES: TFloatField
      FieldName = 'PED_VALOR_TOT_OUTROS_VALORES'
    end
    object cdsCadastroPED_VALOR_DESC0NTO: TFloatField
      FieldName = 'PED_VALOR_DESC0NTO'
    end
    object cdsCadastroPED_VALOR_CREDITO: TFloatField
      FieldName = 'PED_VALOR_CREDITO'
    end
    object cdsCadastroPED_VALOR_PEDIDO: TFloatField
      FieldName = 'PED_VALOR_PEDIDO'
    end
    object cdsCadastroPED_VALOR_TOT_IPI: TFloatField
      FieldName = 'PED_VALOR_TOT_IPI'
    end
    object cdsCadastroUSUARIO_CADASTRO: TStringField
      FieldName = 'USUARIO_CADASTRO'
    end
    object cdsCadastroUSUARIO_AUTERACAO: TStringField
      FieldName = 'USUARIO_AUTERACAO'
    end
    object cdsCadastroUSUARIO_EXCLUSAO: TStringField
      FieldName = 'USUARIO_EXCLUSAO'
    end
    object cdsCadastroDATA_CADASTRO: TDateTimeField
      FieldName = 'DATA_CADASTRO'
    end
    object cdsCadastroDATA_EXCLUSAO: TDateTimeField
      FieldName = 'DATA_EXCLUSAO'
    end
    object cdsCadastroDATA_AUTERACAO: TDateTimeField
      FieldName = 'DATA_AUTERACAO'
    end
    object cdsCadastroEXCLUIDO: TStringField
      FieldName = 'EXCLUIDO'
      FixedChar = True
      Size = 1
    end
    object cdsCadastroPED_ORIGEM: TStringField
      FieldName = 'PED_ORIGEM'
      FixedChar = True
      Size = 1
    end
    object cdsCadastroPED_FRETE: TStringField
      DisplayLabel = 'Frete'
      FieldName = 'PED_FRETE'
      FixedChar = True
      Size = 3
    end
    object cdsCadastroPED_VALORFRETE: TFloatField
      FieldName = 'PED_VALORFRETE'
    end
    object cdsCadastroPED_COMPRADOR: TStringField
      FieldName = 'PED_COMPRADOR'
    end
    object cdsCadastroPED_TIPO: TStringField
      FieldName = 'PED_TIPO'
      FixedChar = True
      Size = 1
    end
    object cdsCadastroPED_SOLICITACAO: TIntegerField
      FieldName = 'PED_SOLICITACAO'
    end
    object cdsCadastroPED_DATASOLICITACAO: TDateTimeField
      FieldName = 'PED_DATASOLICITACAO'
    end
    object cdsCadastroPED_QTDSOLICITACAO: TIntegerField
      FieldName = 'PED_QTDSOLICITACAO'
    end
    object cdsCadastroPED_CONDPAGTO: TStringField
      FieldName = 'PED_CONDPAGTO'
    end
    object cdsCadastroPED_PERCONDPAGTO: TStringField
      FieldName = 'PED_PERCONDPAGTO'
    end
    object cdsCadastroPED_CRITERIO: TIntegerField
      FieldName = 'PED_CRITERIO'
    end
    object cdsCadastroPED_FECHAMENTO: TStringField
      FieldName = 'PED_FECHAMENTO'
      FixedChar = True
      Size = 1
    end
    object cdsCadastroPED_SOLICITANTE: TIntegerField
      FieldName = 'PED_SOLICITANTE'
    end
    object cdsCadastroPED_CONTATO: TStringField
      FieldName = 'PED_CONTATO'
    end
    object cdsCadastroPED_AUT_SITUACAO: TStringField
      FieldName = 'PED_AUT_SITUACAO'
      FixedChar = True
      Size = 1
    end
  end
  object cdsItens: TClientDataSet
    Aggregates = <>
    IndexFieldNames = 'ITENS_PED_PEDIDO'
    MasterFields = 'PED_CODIGO'
    MasterSource = dsCadastro
    PacketRecords = 0
    Params = <>
    ProviderName = 'dspItens'
    Left = 432
    Top = 144
    object cdsItensITENS_PED_CODIGO: TIntegerField
      FieldName = 'ITENS_PED_CODIGO'
    end
    object cdsItensITENS_PED_PEDIDO: TIntegerField
      FieldName = 'ITENS_PED_PEDIDO'
    end
    object cdsItensITENS_PED_PRODUTO: TIntegerField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'ITENS_PED_PRODUTO'
    end
    object cdsItensITENS_PED_QUANTIDADE: TFloatField
      DisplayLabel = 'Quant.'
      FieldName = 'ITENS_PED_QUANTIDADE'
    end
    object cdsItensITENS_PED_QUANTIDADEATEN: TFloatField
      DisplayLabel = 'Atendido'
      FieldName = 'ITENS_PED_QUANTIDADEATEN'
    end
    object cdsItensITENS_PED_VALOR: TFloatField
      DisplayLabel = 'Vr. Unit.'
      FieldName = 'ITENS_PED_VALOR'
    end
    object cdsItensITENS_PED_SITUACAO: TIntegerField
      FieldName = 'ITENS_PED_SITUACAO'
    end
    object cdsItensITENS_PED_VALOR_TOTAL: TFloatField
      DisplayLabel = 'Vr. Total'
      FieldName = 'ITENS_PED_VALOR_TOTAL'
    end
    object cdsItensITENS_PED_LOCAL: TIntegerField
      FieldName = 'ITENS_PED_LOCAL'
    end
    object cdsItensITENS_PED_OUTROS_VALORES: TFloatField
      FieldName = 'ITENS_PED_OUTROS_VALORES'
    end
    object cdsItensITENS_PED_PERC_IPI: TFloatField
      FieldName = 'ITENS_PED_PERC_IPI'
    end
    object cdsItensITENS_PED_VALOR_IPI: TFloatField
      FieldName = 'ITENS_PED_VALOR_IPI'
    end
    object cdsItensITENS_PED_NF: TStringField
      FieldName = 'ITENS_PED_NF'
    end
    object cdsItensUSUARIO_CADASTRO: TStringField
      FieldName = 'USUARIO_CADASTRO'
    end
    object cdsItensUSUARIO_AUTERACAO: TStringField
      FieldName = 'USUARIO_AUTERACAO'
    end
    object cdsItensUSUARIO_EXCLUSAO: TStringField
      FieldName = 'USUARIO_EXCLUSAO'
    end
    object cdsItensDATA_CADASTRO: TDateTimeField
      FieldName = 'DATA_CADASTRO'
    end
    object cdsItensDATA_EXCLUSAO: TDateTimeField
      FieldName = 'DATA_EXCLUSAO'
    end
    object cdsItensDATA_AUTERACAO: TDateTimeField
      FieldName = 'DATA_AUTERACAO'
    end
    object cdsItensEXCLUIDO: TStringField
      FieldName = 'EXCLUIDO'
      FixedChar = True
      Size = 1
    end
    object cdsItensITENS_PED_PRODUTO_DESC: TStringField
      DisplayLabel = 'Produto'
      FieldName = 'ITENS_PED_PRODUTO_DESC'
      Size = 60
    end
    object cdsItensITENS_PED_DATAATEND: TDateTimeField
      FieldName = 'ITENS_PED_DATAATEND'
    end
    object cdsItensITENS_PED_NFATEND: TIntegerField
      FieldName = 'ITENS_PED_NFATEND'
    end
    object cdsItensITENS_PED_IGUALDADE: TStringField
      FieldName = 'ITENS_PED_IGUALDADE'
      FixedChar = True
      Size = 1
    end
    object cdsItensITENS_PED_CONFERENCIA: TStringField
      FieldName = 'ITENS_PED_CONFERENCIA'
      FixedChar = True
      Size = 1
    end
    object cdsItensITENS_PED_PENDENCIA: TStringField
      FieldName = 'ITENS_PED_PENDENCIA'
      FixedChar = True
      Size = 1
    end
    object cdsItensITENS_PED_OBS1: TStringField
      FieldName = 'ITENS_PED_OBS1'
      Size = 40
    end
    object cdsItensITENS_PED_OBS2: TStringField
      FieldName = 'ITENS_PED_OBS2'
      Size = 40
    end
    object cdsItensITENS_PED_DATACONF: TDateTimeField
      FieldName = 'ITENS_PED_DATACONF'
    end
    object cdsItensUSUARIO_RECUPERACAO: TStringField
      FieldName = 'USUARIO_RECUPERACAO'
    end
    object cdsItensDATA_RECUPERACAO: TDateTimeField
      FieldName = 'DATA_RECUPERACAO'
    end
    object cdsItensSITUACAO_DA_REPLICACAO: TStringField
      FieldName = 'SITUACAO_DA_REPLICACAO'
      FixedChar = True
      Size = 1
    end
    object cdsItensCODIGOEMPRESA: TIntegerField
      FieldName = 'CODIGOEMPRESA'
    end
    object cdsItensDATA_REPLICACAO: TDateTimeField
      FieldName = 'DATA_REPLICACAO'
    end
    object cdsItensITENS_PED_PRODMARCA: TStringField
      FieldName = 'ITENS_PED_PRODMARCA'
    end
  end
  object dspItens: TDataSetProvider
    DataSet = QItens
    Constraints = True
    Left = 432
    Top = 112
  end
  object QItens: TQuery
    DatabaseName = 'base'
    DataSource = dsCadastro
    SQL.Strings = (
      'SELECT *'
      'FROM'
      '  ITENSPEDIDO'
      'WHERE'
      '  ITENSPEDIDO.ITENS_PED_PEDIDO = :PED_CODIGO')
    Left = 432
    Top = 80
    ParamData = <
      item
        DataType = ftInteger
        Name = 'PED_CODIGO'
        ParamType = ptUnknown
        Size = 4
      end>
  end
  object dsItens: TDataSource
    AutoEdit = False
    DataSet = cdsItens
    Left = 432
    Top = 48
  end
  object QRanking: TQuery
    DatabaseName = 'base'
    RequestLive = True
    SQL.Strings = (
      'SELECT *'
      'FROM'
      '  RANKING')
    Left = 264
    Top = 56
    object QRankingRANK_SOLICITACAO: TIntegerField
      FieldName = 'RANK_SOLICITACAO'
      Origin = 'BASE.RANKING.RANK_SOLICITACAO'
    end
    object QRankingRANK_DATA: TDateTimeField
      FieldName = 'RANK_DATA'
      Origin = 'BASE.RANKING.RANK_DATA'
      DisplayFormat = 'dd/mm/yyyy'
    end
    object QRankingRANK_PEDIDO: TIntegerField
      FieldName = 'RANK_PEDIDO'
      Origin = 'BASE.RANKING.RANK_PEDIDO'
      DisplayFormat = '000000'
    end
    object QRankingRANK_PRODCODIGO: TIntegerField
      FieldName = 'RANK_PRODCODIGO'
      Origin = 'BASE.RANKING.RANK_PRODCODIGO'
    end
    object QRankingRANK_PROD_DESC: TStringField
      FieldName = 'RANK_PROD_DESC'
      Origin = 'BASE.RANKING.RANK_PROD_DESC'
      Size = 40
    end
    object QRankingRANK_QTDSOLICITACAO: TFloatField
      FieldName = 'RANK_QTDSOLICITACAO'
      Origin = 'BASE.RANKING.RANK_QTDSOLICITACAO'
    end
    object QRankingRANK_PROD_VALORUNIT: TFloatField
      FieldName = 'RANK_PROD_VALORUNIT'
      Origin = 'BASE.RANKING.RANK_PROD_VALORUNIT'
    end
    object QRankingRANK_FRETE: TStringField
      FieldName = 'RANK_FRETE'
      Origin = 'BASE.RANKING.RANK_FRETE'
      FixedChar = True
      Size = 3
    end
    object QRankingRANK_PRODMARCA: TStringField
      FieldName = 'RANK_PRODMARCA'
      Origin = 'BASE.RANKING.RANK_PRODMARCA'
      Size = 40
    end
    object QRankingRANK_ESCOLHIDO: TStringField
      FieldName = 'RANK_ESCOLHIDO'
      Origin = 'BASE.RANKING.RANK_ESCOLHIDO'
      FixedChar = True
      Size = 1
    end
    object QRankingRANK_FORNECEDOR: TIntegerField
      FieldName = 'RANK_FORNECEDOR'
      Origin = 'BASE.RANKING.RANK_FORNECEDOR'
    end
    object QRankingRANK_FORNECEDOR_DESC: TStringField
      FieldName = 'RANK_FORNECEDOR_DESC'
      Origin = 'BASE.RANKING.RANK_FORNECEDOR_DESC'
      Size = 40
    end
    object QRankingUSUARIO_CADASTRO: TStringField
      FieldName = 'USUARIO_CADASTRO'
      Origin = 'BASE.RANKING.USUARIO_CADASTRO'
    end
    object QRankingUSUARIO_AUTERACAO: TStringField
      FieldName = 'USUARIO_AUTERACAO'
      Origin = 'BASE.RANKING.USUARIO_AUTERACAO'
    end
    object QRankingUSUARIO_EXCLUSAO: TStringField
      FieldName = 'USUARIO_EXCLUSAO'
      Origin = 'BASE.RANKING.USUARIO_EXCLUSAO'
    end
    object QRankingDATA_CADASTRO: TDateTimeField
      FieldName = 'DATA_CADASTRO'
      Origin = 'BASE.RANKING.DATA_CADASTRO'
    end
    object QRankingDATA_EXCLUSAO: TDateTimeField
      FieldName = 'DATA_EXCLUSAO'
      Origin = 'BASE.RANKING.DATA_EXCLUSAO'
    end
    object QRankingDATA_AUTERACAO: TDateTimeField
      FieldName = 'DATA_AUTERACAO'
      Origin = 'BASE.RANKING.DATA_AUTERACAO'
    end
    object QRankingEXCLUIDO: TStringField
      FieldName = 'EXCLUIDO'
      Origin = 'BASE.RANKING.EXCLUIDO'
      FixedChar = True
      Size = 1
    end
    object QRankingRANK_VALORICMS: TFloatField
      FieldName = 'RANK_VALORICMS'
      Origin = 'BASE.RANKING.RANK_VALORICMS'
    end
    object QRankingRANK_PERICMS: TFloatField
      FieldName = 'RANK_PERICMS'
      Origin = 'BASE.RANKING.RANK_PERICMS'
    end
    object QRankingRANK_SOLICITANTE: TIntegerField
      FieldName = 'RANK_SOLICITANTE'
      Origin = 'BASE.RANKING.RANK_SOLICITANTE'
    end
    object QRankingRANK_SOLICITANTE_DESC: TStringField
      FieldName = 'RANK_SOLICITANTE_DESC'
      Origin = 'BASE.RANKING.RANK_SOLICITANTE_DESC'
      Size = 60
    end
    object QRankingRANK_CONTATO: TStringField
      FieldName = 'RANK_CONTATO'
      Origin = 'BASE.RANKING.RANK_CONTATO'
    end
    object QRankingUSUARIO_RECUPERACAO: TStringField
      FieldName = 'USUARIO_RECUPERACAO'
      Origin = 'BASE.RANKING.USUARIO_RECUPERACAO'
    end
    object QRankingDATA_RECUPERACAO: TDateTimeField
      FieldName = 'DATA_RECUPERACAO'
      Origin = 'BASE.RANKING.DATA_RECUPERACAO'
    end
    object QRankingSITUACAO_DA_REPLICACAO: TStringField
      FieldName = 'SITUACAO_DA_REPLICACAO'
      Origin = 'BASE.RANKING.SITUACAO_DA_REPLICACAO'
      FixedChar = True
      Size = 1
    end
    object QRankingCODIGOEMPRESA: TIntegerField
      FieldName = 'CODIGOEMPRESA'
      Origin = 'BASE.RANKING.CODIGOEMPRESA'
    end
    object QRankingDATA_REPLICACAO: TDateTimeField
      FieldName = 'DATA_REPLICACAO'
      Origin = 'BASE.RANKING.DATA_REPLICACAO'
    end
  end
  object dsRanking: TDataSource
    DataSet = QRanking
    OnDataChange = dsRankingDataChange
    Left = 264
    Top = 96
  end
end
